<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Gold Bach Conjecturer</title>
  <script>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>repl.it</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <script>   
      function maxr(char) {
          var max = 0;
          var l = 0;
          var count = 0;
          var i = 0;
          var len = char.length;
          var start = 0;
          var str = "";
          var string;
          while(len){
            count = 0;
            start = i;
            while (len && char[i] == char[i+1])
            {
                
                i++;
                count++;
                len--;
            }
            count++;
            if (count > max)
            {
              max = count;
              string = char.charAt(start);
              
            }
            i++;
            len--;
            
          }
          var res = "";
          var add = string; 
          while(max){
            res += add;
            max--;
          }
        
          return res;
}
console.log(maxr("mmmiijjjjkkkkkkssptr"));

    </script>
  </body>
</html>
  </script>
</head>
<body>
  
</body>
</html>